﻿using ConsoleApp1.Models;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1.Services
{
    public class PersonService
    {
        /// <summary>
        /// 私有成员
        /// </summary>
        private Person person;
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="person"></param>
        public PersonService(Person person) {
            this.person = person;
        }

        /// <summary>
        /// 打印Person数据
        /// </summary>
        public void Test()
        {
            Console.WriteLine("打印结果");
            Console.WriteLine(JsonConvert.SerializeObject(person));
        }



    }
}
